import request from '@/utils/request'

/**
 * 厂家信息查询
 */
export function getListPage(params) {
  return request({
    url: '/cms/equipmentClassType/listPage',
    method: 'get',
    params: params
  })
}

/**
 * 获取树
 */
export function getListTree() {
  return request({
    url: `/cms/equipmentClassType/list`,
    method: 'get'
  })
}

/**
 * upd add
 * @param query
 * @returns {AxiosPromise}
 */
export function addOrEditData(param) {
  return request({
    url: '/cms/equipmentClassType/saveOrUpdate',
    method: 'POST',
    data: param
  })
}

/**
 * 分类id获取
 */
export function getById(id) {
  return request({
    url: `/cms/equipmentClassType/getById/${id}`,
    method: 'get'
  })
}

/**
 * 分类信息删除
 */
export function deleteData(id) {
  return request({
    url: `/cms/equipmentClassType/${id}`,
    method: 'delete'
  })
}
/**
 *获取C类型
 */
export function getCList() {
  return request({
    url: `/cms/equipmentClassType/getCList`,
    method: 'get'
  })
}

/**
 *获取列表
 */
export function getList() {
  return request({
    url: `/cms/equipmentClassType/getList`,
    method: 'get'
  })
}

/**
 *获取父节点
 */
export function getByTypeNo(id) {
  return request({
    url: `/cms/equipmentClassType/getByTypeNo/${id}`,
    method: 'get'
  })
}

/**
 *  根据id校验是否有子类
 */
export function getCheckById(id) {
  return request({
    url: `/cms/equipmentClassType/getCheckById/${id}`,
    method: 'get'
  })
}

/**
 *获取c类型列表
 */
export function getDTList() {
  return request({
    url: `/cms/equipmentClassType/getDTList`,
    method: 'get'
  })
}

/**
 *获取父节点
 */
export function getJcjcType() {
  return request({
    url: `/cms/equipmentClassType/getJcjcType`,
    method: 'get'
  })
}
